import request from '@/utils/request.js'

// 获取全部素材

const getAllImages = (params) =>{
    return request.get('/mp/v1_0/user/images',{params:params})
}

// 删除素材

const deleteImageItem  = (imageId)=>{
    return request.delete(`/mp/v1_0/user/images/${imageId}`)
}

// 收藏/取消收藏素材图片

const collectedImage = (imageId,collect) =>{
    return request.put(`/mp/v1_0/user/images/${imageId}}`,{collect:encodeURI(collect)})
    
}

export {
    getAllImages,
    deleteImageItem,
    collectedImage
}